1. Field of the Invention
The invention relates to performance monitoring in integrated circuits.
2. Description of the Related Art
Most microprocessors used in desk top computer systems, are equipped with performance monitoring counters. These counters permit processor performance parameters to be monitored and measured. Such information is useful for performance tuning. Current techniques typically utilize two counters which simultaneously record the occurrence of prespecified events. W hen one of the counters overflows, counting stops and an interrupt is generated. Post-processing software is use d to analyze the gathered data.
Typically two large counters, of e.g., 40-bits or more, are provided for event counting. The counters can generally be read and written from within register address space. The counters can be configured to measure such parameters as the number of data reads that hit in the cache. When configured to determined cache hits, the first counter is programmed to record the number of cache hits and the second counter is programmed to record the number of actual data reads performed. The ratio of the two numbers gives the cache hit rate for read operations. Measured performance parameters are a good estimate of future performance. Actual performance at any instant may vary widely from the measured estimate. The typical use of two large counters does not make any attempt to measured this deviation from the average.
When one of the counters reaches its limit, the overflow signal stops all counting and generates an interrupt. The software interrupt handler then records the counter values, completes post data processing and any other support work necessary.
The size of the counters is important. The larger the counter, the less frequently an interrupt is generated. Such interrupts are undesirable because they intrude into normal processor operation. A larger counter also results in greater data averaging. Therefore, temporary fluctuation in cache hit rate may not be observed. Such temporary fluctuations may, or may not be what is of interest.
Before performance monitoring can be accomplished, an interrupt handler must be installed to deal with counter overflow. Of course, overflow can be avoided by the use of extremely large counters. But extremely large counters may be expensive to implement, unreliable or fail to produce the desired analysis. It would be desirable to monitor performance parameters in an integrated circuit such as a processor without having to provide two large counters, without having to deal with counter overflow, without having to provide software interrupt handlers. It would also be desirable to avoid intrusion of the performance monitoring into the normal functioning of the processor in the system.